package com.gitee.genezhao.bean;

import lombok.Getter;

/**
 * Description:
 *
 * @Author: genezhao
 * @Date: 2018-05-28
 */
public class GetterLazyExample {

    @Getter(lazy=true) private final double[] cached = expensive();

    private double[] expensive() {
        double[] result = new double[1000000];
        for (int i = 0; i < result.length; i++) {
            result[i] = Math.asin(i);
        }
        return result;
    }
}
